<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">    
    <div class="form-group col-sm-4 col-lg-4">
        <label class="control-label col-xs-12 col-sm-4">{:__('Gongyingshang_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-gongyingshang_id" data-rule="required" data-source="pifa/gongyingshang/index" class="form-control selectpage" name="row[gongyingshang_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group col-sm-4 col-lg-4">
        <label class="control-label col-xs-12 col-sm-4">{:__('订单日期')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-createday" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[createday]" type="text" value="{:date('Y-m-d')}">
        </div>
    </div>
    <div class="form-group col-sm-4 col-lg-4">
        <label class="control-label col-xs-12 col-sm-4">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" size="50" name="row[images]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images"></ul>
        </div>
    </div>
    <div class="table_box col-sm-12 col-lg-12">
        <a class="btn btn-info select_user" href="javascript:;">选择商品</a>
        <div class="list" style="overflow-x: auto">
            <table id="sale_table">
                <tbody class="add_item">
                    <tr>
                        <th></th>
                        <th>
                            <span class="must">*</span>
                            商品
                        </th>
                        <th>产品单位</th>
                        <th>单价</th>
                        <th>数量</th>
                        <th>生产日期</th>
                        <th>保质期</th>
                        <th>有效期至</th>
                        <th>优惠金额</th>
                        <th>总价</th>
                        <th>备注</th>
                    </tr>
                    <!-- <tr>
                        <td>
                            <div class="btn_del">
                                <span class="del">
                                    <i class="fa fa-trash"></i>
                                </span>
                            </div>
                        </td>
                        <td>
                            <input type="hidden" name="row[danwei][]" class="danwei" value="' + res[i].danwei + '">
                            <input type="hidden" name="row[goods_spec_id][]" class="goods_code" value="' + res[i].goods_spec_id + '">
                            <input type="hidden" name="row[goods_id][]" class="goods_code" value="' + res[i].goods_id + '">
                            <span>' + res[i].good.goods_name + res[i].spec_name + '</span>
                        </td>
                        <td>
                            <span>' + res[i].danwei + '</span>
                        </td>
                        <td>
                            <input type="number" name="row[item_price][]" class="price" value="' + res[i].goods_price3 + '">
                        </td>
                        <td>
                            <input type="number" name="row[item_goods_num][]" class="goods_num" value="0" data-price="' + res[i].goods_price3 + '">
                        </td>
                        <td>
                            <input class="form-control type=" date" name="row[s_day][]" type="text" value="">
                        </td>
                        <td>
                            <input name="row[b_num][]" type="number" value="">
                        </td>
                        <td>
                            <input class="form-control type=" date" name="row[e_day][]" type="text" value="">
                        </td>
                        <td>
                            <input type="number" name="row[item_youhui_price][]" class="youhui_price">
                        </td>
                        <td>
                            <input type="hidden" name="row[item_goods_price][]" class="goods_price">
                            <span class="goods_price2">0</span>
                        </td>
                        <td>
                            <input type="text" name="row[goods_emo][]" class="goods_emo">
                        </td>
                    </tr> -->
                </tbody>
            </table>
        </div>
    </div>
    <div class="form-group col-sm-4 col-lg-4">
        <label class="control-label col-xs-12 col-sm-4">{:__('Goods_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_price" readonly class="form-control" step="0.01" name="row[goods_price]" type="number">
        </div>
    </div>
    <div class="form-group col-sm-4 col-lg-4">
        <label class="control-label col-xs-12 col-sm-4">{:__('Youhui_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-youhui_price" class="form-control youhui_price_add" step="0.01" name="row[youhui_price]" type="number">
        </div>
    </div>
    <div class="form-group col-sm-4 col-lg-4">
        <label class="control-label col-xs-12 col-sm-4">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" readonly data-rule="required" min="0" class="form-control" step="0.01" name="row[price]" type="number" value="0.00">
        </div>
    </div>
    <div class="form-group col-sm-4 col-lg-4">
        <label class="control-label col-xs-12 col-sm-4">{:__('Num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-num" readonly class="form-control" name="row[num]" type="number">
        </div>
    </div>
    <div class="form-group col-sm-4 col-lg-4">
        <label class="control-label col-xs-12 col-sm-4">{:__('Emo')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-emo" class="form-control" name="row[emo]" type="text">
        </div>
    </div>
    <div class="form-group col-sm-4 col-lg-4">
        <label class="control-label col-xs-12 col-sm-4">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="statusList" item="vo"}
                <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="0" }checked{/in} /> {$vo}</label>
                {/foreach}
            </div>
        </div>
    </div>
    <div class="form-group layer-footer col-sm-12 col-lg-12">
        <label class="control-label col-xs-12 col-sm-4"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<style>
.layui-icon-btn {
    position: relative;
    padding-left: 25px;
}

.layui-icon-btn i {
    position: absolute;
    font-size: 16px;
    left: 5px;
    top: -1px;
}

.layui-table-header th {
    text-align: center;
}

.layui-table-header th div {
    text-align: center;
}

.layui-search input,
select {
    height: 30px;
}

.layui-search .layui-input-inline {
    margin-right: 20px;
    margin-bottom: 10px;
}

.layui-table-cell img {
    max-width: 50px;
}


.must {
    font-size: 12px;
    color: red;
}

.list {
    margin: 10px auto 20px auto;
    position: relative;
    overflow: auto;
}

.list div {
    padding: 0;
}

.list table {
    min-width: 500px;
    width: 100%;
}

.list table th {
    white-space: nowrap;
    padding: 8px 0;
}

.list table th,
td {
    position: relative;
    text-align: center;
    border: solid 1px #e2e2e2;
}

.list .btn {
    margin: auto 8px;
}

.list .btn span {
    margin: auto 3px;
}

.list select {
    width: 100%;
    border: solid 1px #fff;
    height: 30px;
}

.list input,
select {
    width: 100%;
    border: solid 1px #ffffff;
    height: 30px;
    margin: 2px 0;
}

.list input,
select {
    min-width: 80px;
}

.list input:focus,
.list select:focus {
    border: solid 1px #b6b6b6;
}

.fright {
    float: right;
}

.sortspan {
    display: inline-block;
    width: 16px;
}

.sortspan i {
    font-size: 14px;
    line-height: 14px;
    display: block;
    cursor: pointer;
}

.sortspan .active {
    color: red;
}

.layui-table-cell {
    width: auto;
    height: auto;
    /*overflow:visible;*/
    /*text-overflow:inherit;*/
}

.table_box {
    position: relative;
}

.has-audit {
    width: 150px;
    height: 74px;
    background: url(../img/audit.png) 0 0 no-repeat;
    position: absolute;
    right: 40px;
    bottom: 30px;
    z-index: 100;
}

tips {
    color: red;
    font-size: 12px;
}

.province {
    width: 32% !important;
    margin-right: 1% !important;
}

.city {
    width: calc(100% - 68%) !important;
    margin-right: 1% !important;
}

.area {
    width: 32% !important;
    margin-right: 0 !important;
}

.auxiliary_box {
    background: #f5f5f5;
    box-sizing: border-box;
    margin-left: 35px !important;
    padding-bottom: 20px;
}

.auxiliary_box hr {
    border-bottom: 1px solid #ccc !important;
    margin: 10px 15px;
}

.paddingl0 {
    padding-left: 0px !important;
}

.auxiliary_detail {
    margin-left: 20px !important;
}

#btn-autocreat {
    background: #26b5ff;
    border-radius: 3px;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    line-height: 15px;
    padding: 5px 16px;
    font-size: 14px;
    font-weight: normal;
}

#autocreat span {
    color: #9f9c9c;
    font-weight: normal;
}

.disnone,
.batch_set {
    display: none;
}

.shelf_life_div {
    line-height: 33px;
}

.shelf_life_div .form-control {
    width: 120px;
}

.shelf_life_div #batch {
    top: 13px;
}

.more_period .control-label {
    padding-left: 0px !important;
    padding-right: 0px !important;
}

.more_period input {
    padding-right: 0px !important;
}

#ser_form {
    width: 760px;
    padding: 0 20px;
}

#addAuto {
    padding: 5px 16px;
    border: 1px solid #d76f01;
    box-shadow: 0 1px 1px rgb(197 174 141 / 80%);
    background: url();
    background: -moz-linear-gradient(top, #f67f00 0, #ea7800 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f67f00), color-stop(100%, #ea7800));
    background: -webkit-linear-gradient(top, #f67f00 0, #ea7800 100%);
    background: -o-linear-gradient(top, #f67f00 0, #ea7800 100%);
    background: -ms-linear-gradient(top, #f67f00 0, #ea7800 100%);
    background: linear-gradient(to bottom, #f67f00 0, #ea7800 100%);
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 2px rgb(0 0 0 / 22%);
    cursor: pointer;
}

#serial_tbody td {
    padding: 0 1px;
}

.serial_select_box {
    position: relative;
}

.select_more {
    position: absolute;
    right: 8px;
    top: 50%;
    margin-top: -8px;
    cursor: pointer;
}

/*å•ä½*/
#unit_table .advance_rate {
    width: 100px !important;
}

#unit_table .text_right {
    text-align: right;
}

#unit_table {
    font-size: 16px;
    border: 0px !important;
}

#unit_table input {
    width: 100%;
    border: solid 1px #ddd;
    height: 30px;
    margin: 2px 0;
    padding-left: 3px;
}

#unit_table td {
    border: 0px;
    padding: 3px 8px;
}

#unit_table .add i {
    margin-right: 3px;
}

#unit_table .notice {
    font-size: 14px;
}

/*å•ä½ç»“æŸ*/

.batch_div {
    position: relative;
}

.batch_span {
    position: absolute;
    top: 50%;
    right: 5px;
    margin-top: -8px;
    cursor: pointer;
}

.batch_radio {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    position: absolute;
    left: 15px;
}

.rk_btn {
    width: 200px;
    background: #f0ad4e;
    text-align: center;
    margin: 40px auto 10px auto;
    height: 30px;
    line-height: 30px;
    cursor: pointer;
    color: #fff;
    font-weight: bold;
}

.rk_btns {
    width: 200px;
    background: #f0ad4e;
    text-align: center;
    margin: 20px auto 10px auto;
    height: 30px;
    line-height: 30px;
    cursor: pointer;
    color: #fff;
    font-weight: bold;
}

.chose_serial_table {
    width: 100%;
    margin: 20px auto;
}

.chose_serial_table td {
    height: 25px;
}

.chose_serial_table input {
    margin: 0px;
}


.chosegoods .layui-table-body {
    max-height: 400px;
    overflow-y: auto;
}

.chosegoods .layui-table-tool {
    position: absolute;
    background: none;
    border: 0;
    bottom: -2px;
    width: 120px;
    right: 25px;
    padding: 10px 0;
    z-index: 100;
}

.chosegoods .layui-table-tool-self {
    display: none;
}

.chosegoods .layui-table-tool-temp {
    padding-right: 0px;
}

.chosegoods #sure {
    margin-right: 10px;
}

.chose_list_form {
    height: 400px;
    overflow-y: auto;
    margin: 20px auto;
}

.chose_list_form .chose_serial_table {
    margin: 0;
}

.chosetemp .layui-table-tool {
    position: fixed;
    bottom: 10px;
    background: none;
    border: none;
}

.chosetemp .layui-table-tool-temp {
    padding-right: 50px;
}

.chosetemp #sure {
    margin-right: 20px;
}

.chosetemp .layui-table-tool-self {
    display: none;
}

.btn_mb {
    margin-left: 15px;
}

.chosesale .layui-border-box {
    position: relative;
}

.chosesale .layui-table-tool {
    position: absolute;
    background: none;
    border: 0;
    bottom: 5px;
    padding: 0px;
    height: 30px;
    min-height: 30px;
    right: 5px;
}

.hiddens {
    display: none;
}

.choselist .panel-body {
    padding-bottom: 40px;
}

.choselist .layui-border-box {
    position: relative;
}

.choselist .layui-table-tool {
    position: absolute;
    background: none;
    border: 0;
    bottom: -40px;
    padding: 0px;
    height: 30px;
    min-height: 30px;
    right: 5px;
}

.top7 {
    padding: 7px 0 0 0;
}


.upload_panel {
    padding: 32px 58px 55px 58px;
    font-family: "Microsoft Yahei";
}

.upload_panel label {
    font-weight: normal;
}

.steps-ul {
    margin-bottom: 24px;
}

.steps-ul li {
    display: inline-block;
    text-align: center;
    font-size: 15px;
    font-family: "Microsoft Yahei";
    color: #666;
    background: url(../img/step.png);
    line-height: 35px;
    cursor: pointer;
}

.steps-ul .step1-base {
    width: 167px;
}

.steps-ul .step1-nol {
    background-position: 0px -3px;
    color: #666;
}

.steps-ul .step1-cur {
    background-position: 0px -49px;
    color: #fff;
}

.steps-ul .step2-base {
    width: 205px;
    margin-left: -19px;
}

.steps-ul .step2-nol {
    background-position: -167px -3px;
    color: #666;
}

.steps-ul .step2-cur {
    background-position: -167px -49px;
    color: #fff;
}

.steps-ul .step3-base {
    width: 158px;
    margin-left: -25px;
}

.steps-ul .step3-nol {
    background-position: -371px -3px;
    color: #666;
}

.steps-ul .step3-cur {
    background-position: -371px -49px;
    color: #fff;
}

#import-wrap {
    font-size: 14px;
    line-height: 1.8;
}

#import-wrap .ctn {
    margin-bottom: 8px;
}

.ctn p {
    margin-bottom: 15px;
}

.chk {
    padding-left: 20px;
    height: 18px;
    display: inline-block;
    background: url(../img/checked.png) no-repeat;
    cursor: pointer;
    color: #555;
    line-height: 18px;
    vertical-align: middle;
}

.chk.checked {
    background: url(../img/checked.png) 0 -36px no-repeat;
}

.chk input {
    display: none;
}

#import-wrap .chk {
    padding-left: 24px;
}

.mr10 {
    margin-right: 10px;
}

.mr15 {
    margin-right: 15px;
}

.quantityStorage label {
    display: inline-block;
    line-height: 18px;
    vertical-align: middle;
    color: #555;
}

.ui-combo-wrap {
    position: relative;
    display: inline-block;
    height: 28px;
    vertical-align: middle;
    background-color: #fff;
    border: 1px solid #ddd;
    color: #555;
    overflow: hidden;
    zoom: 1;
    margin-top: -4px;
}

.list input,
select {
    width: 100%;
    border: solid 1px #ffffff;
    height: 30px;
    line-height: 30px;
    margin: 0;
}

#import-wrap .file-import-ctn {
    margin-bottom: 30px;
}

#templateUrl {
    display: inline-block;
    width: 60px;
    z-index: 999;
    font-size: 14px;
    line-height: 28px;
    height: 28px;
    background: #31be3b;
    color: #fff;
    text-align: center;
    border: 1px solid #00ab0c;
    border-radius: 2px;
    margin: 0 20px 0px 15px;
}

.mid-wrap {
    border: #EEEEEE 3px solid;
    border-radius: 10px;
    -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
    -o-border-radius: 10px;
    position: relative;
    margin: 22px 0 15px 0;
    padding: 28px;
}

.mid-wrap-tit {
    position: absolute;
    background: #ffffff;
    padding: 3px 6px;
    left: 10px;
    top: -16px;
}

.uploadList p {
    display: inline-block;
    width: 93px;
    z-index: 999;
    font-size: 14px;
    line-height: 28px;
    height: 28px;
    background: #31be3b;
    color: #fff;
    text-align: center;
    border: 1px solid #00ab0c;
    border-radius: 2px;
    margin: 0 20px 0px 15px;
}

.uploadList>input {
    cursor: pointer;
    direction: ltr;
    font-size: 0;
    margin: 0;
    opacity: 0;
    filter: alpha(opacity=0);
    position: absolute;
    left: 130px;
    height: 30px;
    line-height: 30px;
    width: 93px;
    vertical-align: middle;
    z-index: 1000;
}

.uploadList label {
    display: inline-block;
}

#classes .radio {
    margin-left: 20px;
}

#classes .radio input {
    top: 2px;
}

.mid-wrap {
    border: #EEEEEE 3px solid;
    border-radius: 10px;
    -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
    -o-border-radius: 10px;
    position: relative;
    margin: 22px 0 15px 0;
    padding: 28px;
}

.mid-wrap-tit {
    position: absolute;
    background: #ffffff;
    padding: 3px 6px;
    left: 10px;
    top: -16px;
}

.ui-cus-dialog {
    position: fixed;
    width: 100%;
    right: 0px;
    bottom: 0px;
}

.ui_buttons {
    padding: 4px 8px;
    text-align: right;
    white-space: nowrap;
    border-top: 1px solid #ececec;
    border-radius: 0 0 2px 2px;
    background: #fcfcfc;
    background: -moz-linear-gradient(top, #fcfcfc, #f4f4f4);
    background: -webkit-gradient(linear, 0 0, 0 100%, from(#fcfcfc), to(#f4f4f4));
    background: -o-linear-gradient(top, #fcfcfc, #f4f4f4);
    background: -ms-linear-gradient(top, #fcfcfc 0, #f4f4f4 100%);
    background: linear-gradient(top, #fcfcfc, #f4f4f4);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fcfcfc', endColorstr='#f4f4f4');
}

.ui_buttons input {
    display: inline-block;
    zoom: 1;
    margin-left: 10px;
    padding: 0 16px;
    height: 24px;
    border: 1px solid #c1c1c1;
    border-radius: 2px;
    box-shadow: 0 1px 1px rgb(0 0 0 / 15%);
    background: #fff;
    background: -moz-linear-gradient(top, #fff, #f4f4f4);
    background: -webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#f4f4f4));
    background: -o-linear-gradient(top, #fff, #f4f4f4);
    background: -ms-linear-gradient(top, #fff 0, #f4f4f4 100%);
    background: linear-gradient(top, #fff, #f4f4f4);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f4f4f4');
    font: 12px \5b8b\4f53;
    color: #555;
    vertical-align: middle;
    cursor: pointer;
}

input.ui_state_highlight {
    border: 1px solid #38B3EB;
    box-shadow: 0 1px 1px rgb(0 0 0 / 30%);
    background: url();
    background: -moz-linear-gradient(top, #4dc2e6 0, #38B3EB 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #4dc2e6), color-stop(100%, #38B3EB));
    background: -webkit-linear-gradient(top, #4dc2e6 0, #38B3EB 100%);
    background: -o-linear-gradient(top, #4dc2e6 0, #38B3EB 100%);
    background: -ms-linear-gradient(top, #4dc2e6 0, #38B3EB 100%);
    background: linear-gradient(to bottom, #4dc2e6 0, #38B3EB 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4dc2e6', endColorstr='#38B3EB', GradientType=0);
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 2px rgb(0 0 0 / 22%);
}

.file-bar {
    width: 240px;
    background: #eee;
    border-radius: 2px;
    margin-top: 10px;
    display: inline-block;
    margin-right: 20px;
}

.bar {
    height: 9px;
    background: #31be3b;
    border-radius: 2px;
    width: 0px;
}

#upfile {
    top: 90px;
    left: 138px;
}

.customers .steps-ul .step1-base {
    width: 264px;
}

.customers .steps-ul .step1-nol {
    background-position: -8px -94px;
    color: #666;
}

.customers .steps-ul .step1-cur {
    background-position: -8px -137px;
    color: #fff;
}

.customers .steps-ul .step2-base {
    width: 245px;
    margin-left: -19px;
}

.customers .steps-ul .step2-nol {
    background-position: -273px -94px;
    color: #666;
}

.customers .steps-ul .step2-cur {
    background-position: -273px -137px;
    color: #fff;
}

#content .form-control[disabled] {
    background: #fff !important;
}

.invoicing .control-label {
    margin-top: 5px;
}

.smq_switch {
    position: relative;
    padding-right: 25px;
}

.smq_switch i {
    font-size: 20px;
    position: absolute;
}

.table_box th {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

#add-form th {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

#edit-form th {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

/*1.0.5*/
.goods_code_box {
    position: relative;
}

.goods_code_span,
.goods_code_spans {
    position: absolute;
    right: 1px;
    top: 10%;
    padding-right: 5px;
    padding-left: 5px;
    margin-top: 0px;
    cursor: pointer;
    height: 80%;
    line-height: 24px;
    background: #ffffff;
}

.chose_goods_box {
    position: absolute;
    z-index: 100;
    background: #ffffff;
    cursor: pointer;
}

.chose_goods_box tr:hover {
    background: rgba(255, 195, 10, 0.32);
}

.chose_goods_box th {
    background: #d3d3d3 !important;
    border: solid 1px #e2e2e2;
    text-align: center;
    padding: 3px 5px;
}

.chose_goods_box td {
    text-align: center;
    padding: 3px 5px;
}

/*1.0.6*/
.voucherAttachment {
    cursor: pointer;
    display: none;
}

/*1.1.3*/

/*1.1.9*/
.prelation {
    position: relative;
}

.chose_goods_price_box {
    position: absolute;
    top: 33px;
    left: 0;
    background: #fff !important;
    cursor: pointer;
    padding: 10px !important;
    box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
    border-radius: 4px;
    z-index: 100;
}

.chose_goods_price_tr:hover {
    background: rgba(255, 195, 10, 0.32);
}

.chose_goods_price_box table {
    width: 320px !important;
    min-width: 80px;
}

.chose_goods_price_box td {
    width: auto;
    height: 25px;
    text-align: left;
}

.sizeWe {
    font-weight: bold;
}

.goods_num {
    text-align: center;
}
</style>